package com.sxf.util;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class ServletListener implements ServletContextListener {

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		HibernateSessionFactory.closeSessionFactory();

	}

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		new HibernateSessionFactory();

	}

}
